home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / pcoef.doc < prev    next >
Text File  |  1995-03-31  |  1KB  |  41 lines

  1. (Comp.sys.handhelds) 
  2. Item: 362 by billw at hpcvra.CV.HP.COM 
  3. Author: William C Wickes 
  4.   Subj: Polynomial Coefficients PCOEF 
  5.   Date: Wed May 16 1990 11:53  
  6.  
  7. In a response to a previous note, I listed the HP 48SX version of the PCOEF 
  8. program from the HP 28S Mathematical Applications Book.  Unfortunately, 
  9. both tries to list the program were incorrect, the first because 
  10. the SYSEVAL's were wrong, and the second because I left in a comment 
  11. word "COERCE" that should have been deleted.  Anyway, here is the 
  12. correct version: 
  13.  
  14. << 
  15.    3   DUPN   TYPE   SWAP   TYPE   ROT 
  16.    TYPE   3   ->LIST   { 0   6   9 } 
  17.    IF   == 
  18.    THEN   DUP   1   +   ->   n 
  19.       <<   #18CEAh   SYSEVAL 
  20.       SWAP 
  21.          #549CCh   SYSEVAL 
  22.          #74D0h   SYSEVAL 
  23.          #59373h   SYSEVAL 
  24.          DROP   #7497h   SYSEVAL 
  25.          1   n 
  26.          FOR   m   m   ROLL   COLCT 
  27.          NEXT 
  28.          n   ->LIST 
  29.       >> 
  30.    END 
  31. >> 
  32.  
  33. 195 bytes, checksum #6548h (for the program object). 
  34.  
  35. This program expects to find an algebraic expression in level 3, a name 
  36. in level 2, and a number in level 1, where the expression is taken 
  37. as a polynomial of order "number" in the variable "name".  It returns 
  38. a list of the polynomial coefficients in order of decreasing power. 
  39.  
  40. I apologize for the mixups. 
  41.